﻿using Bootstrap.Security;
using Longbow.Cache;
using Longbow.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Bootstrap.DataAccess.Model;
using Longbow.Web.Mvc;
using PetaPoco;

namespace Bootstrap.DataAccess
{
    /// <summary>
    /// 通话明细
    /// </summary>
    public static class CallDetailsHelper
    {
        public const string RetrieveCallDetailsDataKey = "UserHelper-RetrieveCallDetails";
        public const string RetrieveCallDetailsByRoleIdDataKey = "UserHelper-RetrieveCallDetailsByRoleId";
        public const string RetrieveCallDetailsByGroupIdDataKey = "UserHelper-RetrieveCallDetailsByGroupId";
        public const string RetrieveNewCallDetailsDataKey = "UserHelper-RetrieveNewCallDetails";
        public const string RetrieveCallDetailsByNameDataKey = "BootstrapUser-RetrieveCallDetailsByName";

        /// <summary>
        /// 查询通话明细
        /// </summary>
        /// <returns></returns>
        public static Page<CallDetails> RetrievePages(PaginationOption op, DateTime? startTime, DateTime? endTime,
            string CallerID, string CalleeID, string AgentNo, string CallDir) =>
            DbContextManager.Create<CallDetails>().RetrievePages(op, startTime, endTime, CallerID, CalleeID, AgentNo, CallDir);


    }
}
